import { uploadFileService } from "@/services/common/file";
import express from "express";
import multer from "multer";

const router = express.Router();
const upload = multer();


router.post("/upload", upload.single("file"), (req, res) => {
    /*
        #swagger.tags = ['管理端文件']
        #swagger.path = '/admin-api/file/upload'
        #swagger.description = '上传单个文件'
        #swagger.security = [{"bearerAuth": []}]
        #swagger.consumes = ['multipart/form-data']
        #swagger.parameters['file'] = {
            in: 'formData',
            type: 'file',
            required: true,
            description: '文件File对象'
        }
    */
    uploadFileService(req, res);
});

export default router;
